package com.yida.wy.basic.service;

import com.yida.wy.common.domain.WyBaseBuild;
import com.yida.wy.common.domain.WyBaseHouse;
import com.yida.wy.common.domain.WyBaseOwner;
import org.springframework.web.multipart.MultipartFile;

/**
 * 自建楼栋业务处理
 *
 * @author hmh
 */
public interface IWyImpBasicDataService {

    /**
     * 根据房屋标识码删除房屋业主
     *
     * @param houseCodes
     * @return
     */
    boolean removeHouseOwnerByHouseCodes(String[] houseCodes);


    /**
     * 新增房屋业主
     *
     * @param house
     * @param owner
     * @return
     */
    boolean saveHouseOwner(WyBaseHouse house, WyBaseOwner owner);

    /**
     * 修改房屋业主
     *
     * @param house
     * @param owner
     * @return
     */
    boolean updateHouseOwner(WyBaseHouse house, WyBaseOwner owner);


    /**
     * 新增楼栋
     *
     * @param build
     * @return
     */
    boolean savBuild(WyBaseBuild build);

    /**
     * 导入基础项目
     *
     * @param file          文件对象
     * @param updateSupport 是否更新
     * @throws Exception
     */
    String importBaseCommunity(MultipartFile file, boolean updateSupport, boolean outsideFlag) throws Exception;

    /**
     * 导入基础楼栋
     *
     * @param file          文件对象
     * @param updateSupport 是否更新
     * @param communityId   小区ID
     * @return
     * @throws Exception
     */
    String importDataBuild(MultipartFile file, boolean updateSupport, Long communityId, boolean outsideFlag) throws Exception;

    /**
     * 基于项目ID导入基础房屋和业主
     *
     * @param file          文件对象
     * @param updateSupport 是否更新
     * @param buildCode     楼栋编号
     * @return
     * @throws Exception
     */
    String importDataHouseAndOwner(MultipartFile file, boolean updateSupport, Long areaId, String buildCode, boolean outsideFlag) throws Exception;
}
